﻿module game.battle.enemies.base;

public
{
import gamelib.types;
import gamelib.graphics.renderer2d.renderer;

import game.battle.entity;
import game.units;
import game.battle.battlescene;
import game.sprite;
import game.transformmapper;
}

abstract class Base : Entity
{
    private BattleScene mWorld;

    this(BattleScene w) pure nothrow
    {
        mWorld = w;
    }

    @property auto world() const pure nothrow { return mWorld; }

    final void spawnProjectile(T)(in T projectile)
    {
        mWorld.spawnProjectile(projectile);
    }

    final void spawnEntity(T)(in pos_t pos, in pos_t speed, in rot_t dir)
    {
        mWorld.spawnEntity!T(pos, speed, dir);
    }

    enum strafe = false;
}